package com.rickpan.dto.request;

import com.rickpan.entity.TeamMember;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;

/**
 * 添加团队成员请求DTO
 */
@Schema(description = "添加团队成员请求")
public class AddMemberRequest {

    @Schema(description = "用户ID", example = "2", required = true)
    @NotNull(message = "用户ID不能为空")
    private Long userId;

    @Schema(description = "成员角色", example = "MEMBER", allowableValues = {"OWNER", "ADMIN", "MEMBER"})
    private TeamMember.Role role = TeamMember.Role.MEMBER;

    // 构造函数
    public AddMemberRequest() {}

    public AddMemberRequest(Long userId, TeamMember.Role role) {
        this.userId = userId;
        this.role = role;
    }

    // Getter和Setter方法
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public TeamMember.Role getRole() {
        return role;
    }

    public void setRole(TeamMember.Role role) {
        this.role = role;
    }

    @Override
    public String toString() {
        return "AddMemberRequest{" +
                "userId=" + userId +
                ", role=" + role +
                '}';
    }
}
